<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>学生考勤系统</title>
    <link rel="stylesheet" type="text/css" th:href="@{/easyui/css/default.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/easyui/themes/default/easyui.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/easyui/themes/icon.css}"/>
    <script type="text/javascript" th:src="@{/easyui/jquery.min.js}"></script>
    <script type="text/javascript" th:src="@{/easyui/jquery.easyui.min.js}"></script>
    <script type="text/javascript" th:src='@{/easyui/js/outlook2.js}'></script>
    <script type="text/javascript" th:inline="javascript">
        var userType = [[${session.loginUser.userType}]];
        if (userType === "1") {
            var _menus = {
                "menus": [
                    {
                        "menuid": "2", "icon": "", "menuname": "用户管理",
                        "menus": [
                            {
                                "menuid": "21",
                                "menuname": "用户列表",
                                "icon": "icon-user-teacher",
                                "url": "/user/user_list"
                            },
                            {
                                "menuid": "22",
                                "menuname": "学生列表",
                                "icon": "icon-user-student",
                                "url": "/user/student_list"
                            },
                            {
                                "menuid": "23",
                                "menuname": "教师列表",
                                "icon": "icon-user-teacher",
                                "url": "/user/teacher_list"
                            }
                        ]
                    },
                    {
                        "menuid": "4", "icon": "", "menuname": "学科管理",
                        "menus": [
                            {"menuid": "42", "menuname": "专业列表", "icon": "icon-house", "url": "/clazz/clazz_list"}
                        ]
                    },
                    {
                        "menuid": "6", "icon": "", "menuname": "课程管理",
                        "menus": [
                            {
                                "menuid": "61",
                                "menuname": "课程列表",
                                "icon": "icon-book-open",
                                "url": "/course/course_list"
                            },
                        ]
                    },
                    {
                        "menuid": "7", "icon": "", "menuname": "选课管理",
                        "menus": [
                            {
                                "menuid": "71",
                                "menuname": "选课列表",
                                "icon": "icon-book-open",
                                "url": "/selectedCourse/selectedCourse_list"
                            },
                        ]
                    },
                    {
                        "menuid": "9", "icon": "", "menuname": "请假管理",
                        "menus": [
                            {"menuid": "91", "menuname": "请假列表", "icon": "icon-book-open", "url": "/leave/leave_list"},
                        ]
                    },
                    {
                        "menuid": "5", "icon": "", "menuname": "系统管理",
                        "menus": [
                            {"menuid": "51", "menuname": "修改密码", "icon": "icon-set", "url": "/user/personalView"},
                        ]
                    }
                ]
            };
        }
        if (userType === "2") {
            var _menus = {
                "menus": [
                    {
                        "menuid": "2", "icon": "", "menuname": "个人信息管理",
                        "menus": [
                            {
                                "menuid": "21",
                                "menuname": "个人信息",
                                "icon": "icon-user-student",
                                "url": "/user/student_list"
                            },
                        ]
                    },
                    {
                        "menuid": "7", "icon": "", "menuname": "选课管理",
                        "menus": [
                            {
                                "menuid": "71",
                                "menuname": "课程列表",
                                "icon": "icon-book-open",
                                "url": "/selectedCourse/selectedCourse_list"
                            },
                        ]
                    },
                    {
                        "menuid": "8", "icon": "", "menuname": "考勤管理",
                        "menus": [
                            {
                                "menuid": "81",
                                "menuname": "考勤情况",
                                "icon": "icon-book-open",
                                "url": "/attendance/attendance_list"
                            },
                        ]
                    },
                    {
                        "menuid": "9", "icon": "", "menuname": "请假管理",
                        "menus": [
                            {"menuid": "91", "menuname": "请假申请", "icon": "icon-book-open", "url": "/leave/leave_list"},
                        ]
                    },
                    {
                        "menuid": "5", "icon": "", "menuname": "系统管理",
                        "menus": [
                            {"menuid": "51", "menuname": "修改密码", "icon": "icon-set", "url": "/user/personalView"},
                        ]
                    }
                ]
            };
        }
        if (userType === "3" || userType === "4") {
            var _menus = {
                "menus": [
                    {
                        "menuid": "2", "icon": "", "menuname": "学生管理",
                        "menus": [
                            {
                                "menuid": "21",
                                "menuname": "学生列表",
                                "icon": "icon-user-student",
                                "url": "/user/student_list"
                            },
                        ]
                    },
                    {
                        "menuid": "4", "icon": "", "menuname": "学科管理",
                        "menus": [
                            {"menuid": "42", "menuname": "专业列表", "icon": "icon-house", "url": "/clazz/clazz_list"}
                        ]
                    },
                    {
                        "menuid": "3", "icon": "", "menuname": "教师管理",
                        "menus": [
                            {
                                "menuid": "31",
                                "menuname": "教师列表",
                                "icon": "icon-user-teacher",
                                "url": "/user/teacher_list"
                            },
                        ]
                    },
                    {
                        "menuid": "6", "icon": "", "menuname": "课程管理",
                        "menus": [
                            {
                                "menuid": "61",
                                "menuname": "课程列表",
                                "icon": "icon-book-open",
                                "url": "/course/course_list"
                            },
                        ]
                    },
                    {
                        "menuid": "7", "icon": "", "menuname": "选课管理",
                        "menus": [
                            {
                                "menuid": "71",
                                "menuname": "选课列表",
                                "icon": "icon-book-open",
                                "url": "/selectedCourse/selectedCourse_list"
                            },
                        ]
                    },
                    {
                        "menuid": "8", "icon": "", "menuname": "考勤管理",
                        "menus": [
                            {
                                "menuid": "81",
                                "menuname": "考勤列表",
                                "icon": "icon-book-open",
                                "url": "/attendance/attendance_list"
                            },
                        ]
                    },
                    {
                        "menuid": "9", "icon": "", "menuname": "请假管理",
                        "menus": [
                            {"menuid": "91", "menuname": "请假列表", "icon": "icon-book-open", "url": "/leave/leave_list"},
                        ]
                    },
                    {
                        "menuid": "5", "icon": "", "menuname": "系统管理",
                        "menus": [
                            {"menuid": "51", "menuname": "修改密码", "icon": "icon-set", "url": "/user/personalView"},
                        ]
                    }
                ]
            };
        }
        if (userType === "5") {
            var _menus = {
                "menus": [
                    {
                        "menuid": "4", "icon": "", "menuname": "学科管理",
                        "menus": [
                            {"menuid": "42", "menuname": "专业列表", "icon": "icon-house", "url": "/clazz/clazz_list"}
                        ]
                    },
                    {
                        "menuid": "3", "icon": "", "menuname": "教师管理",
                        "menus": [
                            {
                                "menuid": "31",
                                "menuname": "教师列表",
                                "icon": "icon-user-teacher",
                                "url": "/user/teacher_list"
                            },
                        ]
                    },
                    {
                        "menuid": "6", "icon": "", "menuname": "课程管理",
                        "menus": [
                            {
                                "menuid": "61",
                                "menuname": "课程列表",
                                "icon": "icon-book-open",
                                "url": "/course/course_list"
                            },
                        ]
                    },
                    {
                        "menuid": "8", "icon": "", "menuname": "考勤管理",
                        "menus": [
                            {
                                "menuid": "81",
                                "menuname": "查看考勤",
                                "icon": "icon-book-open",
                                "url": "/attendance/attendance_list"
                            },
                        ]
                    },
                    {
                        "menuid": "9", "icon": "", "menuname": "请假管理",
                        "menus": [
                            {"menuid": "91", "menuname": "请假列表", "icon": "icon-book-open", "url": "/leave/leave_list"},
                        ]
                    },
                    {
                        "menuid": "5", "icon": "", "menuname": "系统管理",
                        "menus": [
                            {"menuid": "51", "menuname": "修改密码", "icon": "icon-set", "url": "/user/personalView"},
                        ]
                    }
                ]
            };
        }
    </script>

</head>
<body class="easyui-layout" style="overflow-y: hidden;" scroll="no">

<div region="north" split="true" border="false" style="overflow: hidden; height: 80px;
        background:  #1e347b repeat-x center 50%;
        line-height: 70px;color: #fff; font-family: Verdana, 微软雅黑,黑体">
    <img th:src="@{/h-ui/images/logo.jpg}" style="width:80px;float:left"/>
    <span style="padding-left:10px; font-size: 50px;font-family: '华文行楷'">武生院数计学院学生考勤系统</span>
    <span style="float:right; padding-right:20px;" class="head">
            欢迎用户:
            <span style="color:red; font-weight:bold;" th:if="${session.loginUser != null}" th:text="${session.loginUser.nickName}">&nbsp</span>
            <span th:if="${session.loginUser.userType == '2'}">
             &nbsp;&nbsp;&nbsp;
            学号： <span style="color:red; font-weight:bold;" th:text="${session.loginUser.username}">&nbsp</span>
            </span>
            &nbsp;&nbsp;&nbsp;
            <a th:href="@{/user/logout}" id="loginOut">退出</a>
        </span>
</div>
<div region="west" hide="true" split="true" title="导航菜单" style="width:180px;" id="west">
    <div id="nav" class="easyui-accordion" fit="true" border="false" style="background-color: #31b0d5;"></div>
</div>
<div id="mainPanle" region="center" style="background-color: #31b0d5; overflow-y:hidden">
    <div id="tabs" class="easyui-tabs" fit="true" border="false" th:include="user/welcome :: welcome"></div>
</div>
<div region="south" split="true" style="height: 30px; background: #D2E0F2; ">
    <div class="footer">Copyriht &copy; 2021-2022 XXX学院&nbsp;&nbsp;&nbsp;&nbsp; 版权归属：Web应用开发专业团队</div>
</div>
</body>
</html>